﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Layouts/Administration.Master" Inherits="System.Web.Mvc.ViewPage<FacialClub.Models.ViewModels.CustomerViewModel>" %>
<%@ Import Namespace="FacialClub.Helpers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Create
</asp:Content>

<asp:Content ID="Content2" runat="server" contentplaceholderid="HeadContent"> 
    <script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
    <script src="/Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
    <script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>

<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript" />
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript" />

<script type="text/javascript">
    $(function () {
        $("#Customer_BirthDate").datepicker({
            showOn: 'button',
            buttonImage: '/Content/Images/calendar.gif',
            buttonImageOnly: true
        });
    });
	</script>
</asp:Content>
<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Create a New Account</h2>
	<%: Html.ValidationSummaryJQuery("Please fix these errors.", new Dictionary<string, object> { { "id", "valSumId" } })%>
    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm()) {%>
    <% ViewContext.FormContext.ValidationSummaryId = "valSumId"; %>
  <div>
    <fieldset>
    <legend>Account Information</legend>
    <table align="left" cellspacing="4" width="100%">
      <tr>
        <td><div class="editor-label"> First Name </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.FirstName) %>
            <%: Html.ValidationMessageFor(model => model.Customer.FirstName, "*")%>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> Last Name </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.LastName)%>
            <%: Html.ValidationMessageFor(model => model.Customer.LastName, "*")%>
          </div></td>
      </tr>
      <tr>
        <td><div class="editor-label"> Birth Date </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.BirthDate, new { style = "width:120px" })%>
            <%: Html.ValidationMessageFor(model => model.Customer.BirthDate, "*")%>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> Email </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.Email) %>
            <%: Html.ValidationMessageFor(model => model.Customer.Email,"*") %>
          </div></td>
      </tr>
      <tr>
        <td><div class="editor-label"> Phone </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.Telephone) %>
            <%: Html.ValidationMessageFor(model => model.Customer.Telephone, "*")%>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> Fax </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.Fax) %>
            <%: Html.ValidationMessageFor(model => model.Customer.Fax,"*") %>
          </div></td>
      </tr>
      <tr>
        <td><div class="editor-label"> Address </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.Address)%>
            <%: Html.ValidationMessageFor(model => model.Customer.Address,"*") %>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> Town/City </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.City) %>
            <%: Html.ValidationMessageFor(model => model.Customer.City,"*") %>
          </div></td>
      </tr>
      <tr>
        <td><div class="editor-label"> Postal Code </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.PostalCode) %>
            <%: Html.ValidationMessageFor(model => model.Customer.PostalCode,"*") %>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> State </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.State) %>
            <%: Html.ValidationMessageFor(model => model.Customer.State,"*") %>
          </div></td>
      </tr>
      <tr>
        <td><div class="editor-label"> Country </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.Country) %>
            <%: Html.ValidationMessageFor(model => model.Customer.Country,"*") %>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> User Name </div></td>
        <td><div class="editor-field">
            <%: Html.TextBox("UserName")%>
            <%: Html.ValidationMessage("UserName", "*")%>
          </div></td>
      </tr>
      <tr>
        <td><div class="editor-label"> Password </div></td>
        <td><div class="editor-field">
            <%: Html.Password("Password")%>
            <%: Html.ValidationMessage("Password", "*")%>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> ConfirmPassword </div></td>
        <td><div class="editor-field">
            <%: Html.Password("ConfirmPassword")%>
            <%: Html.ValidationMessage("ConfirmPassword", "*")%>
          </div></td>
      </tr>
      <tr>
        <td><p>
            <input type="submit" value="Register" />
          </p></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
    </fieldset>
  </div>
  <% } %>
</asp:Content>


